Optimal. Leaf size=22 \[ -\frac {a}{x}-\frac {b x^{n-1}}{1-n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \[ -\frac {a}{x}-\frac {b x^{n-1}}{1-n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rubi steps
\begin {align*} \int \frac {a+b x^n}{x^2} \, dx &=\int \left (\frac {a}{x^2}+b x^{-2+n}\right ) \, dx\\ &=-\frac {a}{x}-\frac {b x^{-1+n}}{1-n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 22, normalized size = 1.00 \[ -\frac {a}{x}-\frac {b x^{n-1}}{1-n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 23, normalized size = 1.05 \[ -\frac {a n - b x^{n} - a}{{\left (n - 1\right )} x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {b x^{n} + a}{x^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 21, normalized size = 0.95 \[ \frac {\frac {b \,{\mathrm e}^{n \ln \relax (x )}}{n -1}-a}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.19, size = 20, normalized size = 0.91 \[ \frac {b\,x^n}{x\,\left (n-1\right )}-\frac {a}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.43, size = 32, normalized size = 1.45 \[ \begin {cases} - \frac {a n}{n x - x} + \frac {a}{n x - x} + \frac {b x^{n}}{n x - x} & \text {for}\: n \neq 1 \\- \frac {a}{x} + b \log {\relax (x )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________